Skip to content

chore(gateway): keep a day of gateway logs on the box - #1506

Merged
MicBun merged 1 commit into
mainfrom
chore/gateway-logs-24h
Nov 26, 2026
Merged

MicBun merged 1 commit into
mainfrom
chore/gateway-logs-24h

Conversation

@MicBun

@MicBun MicBun commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The gateway's Docker log keeps 72 files of 100 MB instead of 2, and compresses the rotated ones.
  • With 2 files the mainnet gateway kept 30 to 60 minutes of logs, so nothing was left by the time a report about the day before came in.

Sizing

Measured on the mainnet gateway on 26 Nov 2026: one 100 MB file covered 06:48:15 to 07:18:29 UTC, about 200 MB an hour, and gzip shrinks a full file to 4.8 MB. 72 files hold about 30 hours at that rate in about 0.5 GB of disk. The testnet gateway writes about a quarter of that.

Applying it

A running container keeps its log options until it is recreated, so each gateway box needs the same logging block in its own gateway-compose.yaml, then docker compose up -d for kwil-gateway. Recreating the container drops its current logs and signs clients out, the same as a restart.

Related:

Summary by CodeRabbit

  • Chores
    • Gateway logs now retain more rotated files and compress older logs, while keeping the existing per-file size limit.

@MicBun MicBun self-assigned this Nov 26, 2026
@holdex

holdex Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Time Submission Status

Member # Time Running Total Status Last Update
MicBun 1 30min 30min Nov 26, 2026, 8:25 AM
MicBun 2 10min 10min Nov 26, 2026, 8:26 AM
MicBun 10min ✅ Submitted

Submit or update total time with:

@holdex pr submit-time 2h

Add time on top of previous submission with:

@holdex pr add-time 1h30m

See available commands to help comply with our Guidelines.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The gateway JSON-file logging configuration now retains up to 72 rotated files and compresses them. The maximum file size remains 100m.

Changes: Gateway logging

Layer / File(s) Summary
Configure log rotation
deployments/gateway/gateway-compose.yaml
The logger now retains up to 72 files and compresses rotated files. The comments describe estimated retention and disk usage. The 100m per-file limit is unchanged.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related issues

Suggested reviewers: outerlook

Merge Risk: Minimal · up to a20b1

This raises gateway log retention to about 30 hours on mainnet, using roughly 0.5 GB of disk. Applying it requires recreating the gateway container, which briefly signs clients out as a restart does. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: gateway log retention is raised so that about a day of logs stays on the host. The changeset raises the kwil-gateway JSON-file retention from 2 to 72 rotated files and…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: gateway log retention is raised so that about a day of logs stays on the host. The changeset raises the kwil-gateway JSON-file retention from 2 to 72 rotated files and enables compression, which matches the objective of keeping roughly 30 hours of logs. The 'chore(gateway):' prefix is a conventional type and scope, and the wording is specific enough for a teammate to scan history.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9544707d-976b-4355-a207-75f51dc2f33e
Commits

Reviewing files that changed from the base of the PR and between f938345 and a20b15f.

Files selected for processing: 1

  • deployments/gateway/gateway-compose.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@MicBun

MicBun commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@holdex pr submit-time 10m

@MicBun
MicBun merged commit 52e4d79 into main Nov 26, 2026
12 checks passed
@MicBun
MicBun deleted the chore/gateway-logs-24h branch November 26, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant